Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Union Decoder uses readInt #387

Merged
merged 3 commits into from
Apr 28, 2024
Merged

Conversation

brianshih1
Copy link
Contributor

According to the Avro spec for binary encoding of Union types, a union is encoded by first writing an int value.

Screenshot 2024-04-26 at 4 17 54 PM

However, the current decoder uses ReadLong instead of ReadInt, which causes some errors when ReadInt and ReadFloat returns different values.

@nrwiersma
Copy link
Member

This seems to have changed in v1.10 of the spec. Could you also update the encoders?

Copy link
Member

@nrwiersma nrwiersma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉 Thanks.

@nrwiersma nrwiersma merged commit e42dea1 into hamba:main Apr 28, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants